import sys
from pathlib import Path

# 获取项目根目录
ROOT_DIR = Path(__file__).parent

# 需要包含的数据文件
datas = [
    ('frame_schema.xml', '.'),  # 将schema文件复制到根目录
    ('logger.py', '.'),
    ('frame_processor.py', '.'),
    ('visualization.py', '.'),
    ('progress_dialog.py', '.'),
    ('frame_schema_parser.py', '.'),
    ('log_analyzer.py', '.'),
    ('network_handler.py', '.'),
]

# 需要包含的Python包
hidden_imports = [
    'PyQt5',
    'PyQt5.sip',
    'numpy',
    'pandas',
    'matplotlib',
    'matplotlib.backends.backend_qt5agg',
    'xml.etree.ElementTree',
    'logging',
    'openpyxl',  # 用于Excel导出
    # Cython扩展模块
    'cython_frame_comparer',
    'cython_data_extractor'
]

# 排除不需要的模块
excludes = [
    'tkinter',
    'test',
    'distutils',
    'mock_server',  # 测试用服务器
    'generate_test_data'  # 测试数据生成器
]

# 需要随exe一起打包的二进制扩展(.pyd/.dll)
binaries = [
    ('cython_frame_comparer.cp311-win_amd64.pyd', '.'),
    ('cython_data_extractor.cp311-win_amd64.pyd', '.'),
] 